package cn.itsuorce.service.impl;

import cn.itsuorce.domain.Department;
import cn.itsuorce.mapper.DepartmentMapper;
import cn.itsuorce.query.DepartmentQuery;
import cn.itsuorce.service.IBaseService;
import cn.itsuorce.service.IDepartmentService;
import cn.itsuorce.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class DepartmentServiceImpl extends BaseServiceImpl<Department, DepartmentQuery>
        implements IDepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;



    /**
     * 查询部门唯一
     * @param sn
     * @param id
     * @return
     */
    @Override
    public Department findBySn(String sn, String id) {

        return departmentMapper.findBySn(sn,id);
    }
}
